#!/bin/sh
# iBack - Backupsoftware for files and databases
# Author: Daniel Vigano
# License: GPL 2 (see the file license.txt)

mysql="1"
 mysql_host="localhost"
 mysql_user="qql"
 mysql_password="qql87985049"
 mysql_database="qql"
files="1"
 path="/data/backup/"
 filename="backup01"

datum=$(date +%Y_%m_%d_%H_%M)

if [ $mysql = "1" ]; then
cd /data/backup/
mysqldump -h $mysql_host -u $mysql_user -p$mysql_password -r $mysql_database.sql $mysql_database
tar -czf $datum.sql.tar.gz $mysql_database.sql
rm $mysql_database.sql
else
echo "MySQL-Backup disable"
fi

